SeslLinearLayoutCompat
(SESL variant) of LinearLayoutCompat that adds support for rounded corners and recoil animation. The rounded corners can be configured using the seslLayoutRoundedCorner
attribute. The recoil animation effect that provides visual feedback during user interactions such as touch events or key presses.
Key Features:
- Rounded Corners: Supports customizable rounded corners via the SeslRoundedCorner utility. The degree of rounding can be specified through XML attributes.
- Recoil Animation: Implements a recoil animation using SeslRecoilAnimator to provide dynamic feedback on interaction with child views. This animation is triggered by touch events (including S Pen events) and key events (specifically the Enter key).
- Interaction Handling: Manages touch and key events to appropriately trigger animations and update the state of child views. It identifies the clickable child view under the touch event and applies the press/release states accordingly.
Usage: This layout can be used as a direct replacement for LinearLayoutCompat in XML layouts where rounded corners and recoil animations are desired.
<androidx.appcompat.widget.SeslLinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:seslLayoutRoundedCorner="all">
<!-- Child views -->
</androidx.appcompat.widget.SeslLinearLayoutCompat>
Content copied to clipboard